<#ibiztemplate>
TARGET=PSSYSSERVICEAPI
</#ibiztemplate>
package ${pub.getPKGCodeName()}.api.${item.getCodeName()?lower_case}.swagger;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ComponentScan;

import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Configuration
@EnableSwagger2
@ComponentScan("${pub.getPKGCodeName()}.api.${item.getCodeName()?lower_case}")
public class SwaggerConfiguration {


	@Bean
	public Docket createDocket() {
		return new Docket(DocumentationType.SWAGGER_2)
				.groupName("${item.getName()}")
				.apiInfo(
						new ApiInfoBuilder()
						.title("${item.getName()}")
						.description("${item.getMemo()}")
						.termsOfServiceUrl("https://xxxx")
						.version("${item.getAPIVersion()}.0")
						.build()
                    )
				.select()
				.apis(RequestHandlerSelectors.basePackage("${pub.getPKGCodeName()}.api.${item.getCodeName()?lower_case}"))
				.paths(PathSelectors.any())
				.build()
				;
	}
	

}